﻿package extreme.fizzbuzz;

public class FizzWhizz {
    private final int number;
    public FizzWhizz(int number){
        this.number=number;
    }
    public String numberOff(){
        if (isDivByThree()&&isDivBySeven()){
            return "FizzWhizz";
        }
        if (isDivByThree()){
            return "FIZZ";
        }
        if (isDivBySeven()){
            return  "Whizz";
        }
        return String.valueOf(number);

    }
    public boolean isDivByThree(){
        return  isDivBy(3);
    }
    public boolean isDivBySeven(){
        return  isDivBy(7);
    }

    private boolean isDivBy(int num) {
        return number %num==0;

    }

}